package com.gray.repository;

import com.gray.entity.COrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface COrderRepository extends JpaRepository<COrder,Long> {

    @Query(nativeQuery = true,value = "SELECT * FROM c_order WHERE user_id= ?1")
    COrder findByUserId(@Param("user_id") Integer id);


}
